/*
 * IO.cpp
 * unused right now, destined to be something for switching between Serial and Ethernet inputs/outputs
 *
 *  Created on: 6 mars 2012
 *      Author: Jeff
 */


#ifndef _IO_H_
#define _IO_H_

#include <Arduino.h>

// function to print a PROGMEM string
void printPGM(const prog_uchar * str);
boolean testStrings(const char * a, const prog_uchar * b);

// macros for outputing and inputing things in various objects
// tend to become something like an interface for outputing in different places (LCD?)
// at the same time, or for switching from Serial to Ethernet input
#define OUTPUT_PRINTPGM(thing)	printPGM(thing)
#define OUTPUT_PRINT(thing)	Serial.print(thing)
#define OUTPUT_PRINTLN(thing)	Serial.println(thing)
#define OUTPUT_PRINTBYTE(a,b)	Serial.print(a,b)
#define OUTPUT_WRITE(buf,len)	Serial.write(buf,len)
#define INPUT_AVAILABLE()	Serial.available()
#define INPUT_READ() Serial.read()

#endif
